package MyFitnessPlate.DataSet;

public class ParsedExerciseDataSet {
	private Integer entry_id = null;
	private Integer	duration = null;
	private Integer	category_id = null;
	private String	category_name= null;
	private Integer	description_id = null;
	private Integer	met = null;
	private String descriptionText = null;
	
	public Integer getEntry_id() { return entry_id; }
	public void setEntry_id(String category) {	this.entry_id = Integer.parseInt(category); }
	
	public Integer getDuration() { return duration; }
	public void setDuration(String duration) {	this.duration = Integer.parseInt(duration);	}
	
	public Integer getCategoryId() { return category_id; }
	public void setCategoryId(String id) { this.category_id = Integer.parseInt(id);	}
	
	public String getCategoryName() { return category_name; }
	public void setCategoryName(String name) { this.category_name = name; }
	
	public Integer getDescriptionId() { return description_id; }
	public void setDescriptionId(String id) { this.description_id = Integer.parseInt(id); }
	
	public Integer getMet() { return met; }
	public void setMet(String met) { this.met = Integer.parseInt(met); }
	
	public String getDescriptionName() { return descriptionText; }
	public void setDescriptionName(String name) { this.descriptionText = name; }
	
	public Double getCalories(){
		Double calories = new Double(met*(duration/5)*7.2);
		return calories;
	}
	
	public String toString() {
		String returnString = ""+descriptionText+"\n";
		returnString += "Duration: "+duration+" minutes\n";
		returnString += "Calories burnt: "+String.format("%4.1f", getCalories());
		return returnString;
	}
}